package com.inepex.graphicstests.client.animation;

import com.google.gwt.animation.client.Animation;
import com.google.gwt.event.dom.client.LoadEvent;
import com.google.gwt.event.dom.client.LoadHandler;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.RootPanel;
import com.inepex.inegraphics.impl.client.DrawingAreaGWT;
import com.inepex.inegraphics.shared.Context;
import com.inepex.inegraphics.shared.gobjects.Circle;

public class TraceEffectTest extends Animation{

	AbsolutePanel container;
	
	public TraceEffectTest() {
		DrawingAreaGWT da = new DrawingAreaGWT(600, 400);
		Circle c = new Circle(340, 200, 180, true, true, new Context(0.9, "red", 6, "yellow"), 0);
		da.add(c);
		container = new AbsolutePanel();
		container.add(da.getWidget(), 0, 0);
		RootPanel.get().add(container);
		da.update();
		this.run(3000);
//		container.addDomHandler(new Attac)
	}

	@Override
	protected void onUpdate(double progress) {
		container.setPixelSize((int) (600 * progress), 400);
	}
	
	
}
